<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script src="employee.js"></script>
    <script src="emService.js"></script>
    <style>
        .hidDiv{
            display: flex;
            background-color: aqua;
            left: 0px;
            top: 0px;
            position: absolute;
            visibility: hidden;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 100%;
        }
        .contDiv{
            background-color: white;
            width: 600px;
            height: 400px;
            border: 1px black;
        }
    </style>
</head>
<body>
<table border="1" width="80%">
    <thead>
    <tr><th onclick="sortEmplouee('code')">编号</th><th>姓名</th><th onclick="sortEmplouee('money')">工资</th><th>性别</th><th>操作</th></tr>
    </thead>
    <tbody id="data"></tbody>
</table>
姓名：<input type="text" id="nameTxt">
<input type="button" value="查找" onclick="finByName()">
<input type="button" value="添加" onclick="addDiv()">
<div class="hidDiv" id="add">
    <div class="contDiv">
        编号：<input type="text" id="codeTxt" onblur="checkCode()">
        <span id="codeSpan"></span><br>
        姓名：<input type="text" id="nameTxts" onblur="checkName()">
        <span id="nameSpan"></span><br>
        工资：<input type="text" id="moneyTxt" onblur="checkMoney()">
        <span id="moneySpan"></span><br>
        性别：<input type="text" id="sexTxt" onblur="checkSex()">
        <span id="sexSpan"></span><br>
        <input type="button" value="添加" onclick="add()">
    </div>
</div>

<div class="hidDiv" id="updateDiv">
    <div class="contDiv">
        编号：<span id="codeSpan1"></span>><br>
        姓名：<span id="nameSpan1"></span>><br>
        工资：<input type="text" id="updateMoneyTxt" onblur="checkMoney()">
        <span id="moneySpan1"></span><br>
        性别：<span id="sexSpan1"></span>><br>
        <input type="button" value="修改" onclick="update()">
    </div>
</div>
</body>
</html>